home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / SpriteEngine / SE No Timer / SpriteHandlers.h < prev   
Text File  |  1995-03-12  |  819b  |  28 lines

  1. /* Application-dependent definitions */
  2.  
  3. /* All the possible kinds of game entities */
  4. /* Add new types as necessary */
  5. //typedef enum {playerEntity, enemyEntity, goldEntity} EntityType;
  6.  
  7.  
  8. /* Data structure describing a sprite*/
  9. /* Add new fields as necessary */
  10.  
  11. /**/
  12.  
  13. typedef struct SpriteRecord {
  14. /*Game entity data - edit as desired*/
  15.     Point            speed;                /* Fixed-point! */
  16.     Point            fixedPointPosition;    /* Fixed-point! */
  17.     long            lastTime;
  18. /*Sprite data - don't remove*/
  19.     Point            position;            /* Integer screen coordinates! */
  20.     GrafPtr            face;                /* Apprearance of the sprite */
  21.     Rect            drawingRect;        /* Where is it? */
  22. /*List pointers - don't remove*/
  23.     struct SpriteRecord    *prev, *next;        /* Next enity in the list */
  24. } SpriteRecord;
  25.  
  26. // Decomment this if fixedPointPosition is declared below!
  27. #define    _hasfixedpoint
  28.